<template>
	<view class="page-live">
		<pageHeader title="直播"></pageHeader>
		<tab :datas="tab" @tabClick="tabClick"></tab>
		<view class="p-40">
			<liveItem :datas="item" :type="type" v-for="item in list" :key="item.id"></liveItem>
		</view>
	</view>
</template>

<script>
	import tab from '../../components/tab.vue'
	import liveItem from '../../components/liveItem.vue'
	export default {
		components: {
			tab,
			liveItem
		},
		data() {
			return {
				tab:[
					{id:1,name:'正在直播'},
					{id:2,name:'即将开播'},
				],
				list:[
					{id:1,img:'https://z3.ax1x.com/2021/08/08/flF1Tx.jpg'},
					{id:2,img:'https://z3.ax1x.com/2021/08/08/flFN1e.jpg'},
					{id:3,img:'https://z3.ax1x.com/2021/08/08/flFU6H.jpg'},
					{id:4,img:'https://z3.ax1x.com/2021/08/08/flFaXd.jpg'},
					{id:5,img:'https://z3.ax1x.com/2021/08/08/flFwnA.jpg'},
				],
				type:1
			};
		},
		methods: {
			tabClick(data) {
				this.type = data.id
			}
		}
	}
</script>

<style lang="scss">

</style>
